3.2.86 \(\int (d+e x) \log (c (a+b x^2)^p) \, dx\) [186]

Optimal. Leaf size=99 \[ -2 d p x-\frac {1}{2} e p x^2+\frac {2 \sqrt {a} d p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}-\frac {\left (b d^2-a e^2\right ) p \log \left (a+b x^2\right )}{2 b e}+\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e} \]

[Out]

-2*d*p*x-1/2*e*p*x^2-1/2*(-a*e^2+b*d^2)*p*ln(b*x^2+a)/b/e+1/2*(e*x+d)^2*ln(c*(b*x^2+a)^p)/e+2*d*p*arctan(x*b^(
1/2)/a^(1/2))*a^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {2513, 815, 649, 211, 266} \begin {gather*} \frac {2 \sqrt {a} d p \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}-\frac {p \left (b d^2-a e^2\right ) \log \left (a+b x^2\right )}{2 b e}-2 d p x-\frac {1}{2} e p x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*Log[c*(a + b*x^2)^p],x]

[Out]

-2*d*p*x - (e*p*x^2)/2 + (2*Sqrt[a]*d*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[b] - ((b*d^2 - a*e^2)*p*Log[a + b*x^
2])/(2*b*e) + ((d + e*x)^2*Log[c*(a + b*x^2)^p])/(2*e)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 815

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m*((f + g*x)/(a + c*x^2)), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 2513

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_.)*(x_))^(r_.), x_Symbol] :> Simp[(f
 + g*x)^(r + 1)*((a + b*Log[c*(d + e*x^n)^p])/(g*(r + 1))), x] - Dist[b*e*n*(p/(g*(r + 1))), Int[x^(n - 1)*((f
 + g*x)^(r + 1)/(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x] && (IGtQ[r, 0] || RationalQ[n
]) && NeQ[r, -1]

Rubi steps

\begin {align*} \int (d+e x) \log \left (c \left (a+b x^2\right )^p\right ) \, dx &=\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}-\frac {(b p) \int \frac {x (d+e x)^2}{a+b x^2} \, dx}{e}\\ &=\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}-\frac {(b p) \int \left (\frac {2 d e}{b}+\frac {e^2 x}{b}-\frac {2 a d e-\left (b d^2-a e^2\right ) x}{b \left (a+b x^2\right )}\right ) \, dx}{e}\\ &=-2 d p x-\frac {1}{2} e p x^2+\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}+\frac {p \int \frac {2 a d e-\left (b d^2-a e^2\right ) x}{a+b x^2} \, dx}{e}\\ &=-2 d p x-\frac {1}{2} e p x^2+\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}+(2 a d p) \int \frac {1}{a+b x^2} \, dx+\frac {\left (\left (-b d^2+a e^2\right ) p\right ) \int \frac {x}{a+b x^2} \, dx}{e}\\ &=-2 d p x-\frac {1}{2} e p x^2+\frac {2 \sqrt {a} d p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}-\frac {\left (b d^2-a e^2\right ) p \log \left (a+b x^2\right )}{2 b e}+\frac {(d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right )}{2 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 83, normalized size = 0.84 \begin {gather*} -2 d p x+\frac {2 \sqrt {a} d p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b}}+d x \log \left (c \left (a+b x^2\right )^p\right )+\frac {1}{2} e \left (-p x^2+\frac {\left (a+b x^2\right ) \log \left (c \left (a+b x^2\right )^p\right )}{b}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*Log[c*(a + b*x^2)^p],x]

[Out]

-2*d*p*x + (2*Sqrt[a]*d*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[b] + d*x*Log[c*(a + b*x^2)^p] + (e*(-(p*x^2) + ((a
 + b*x^2)*Log[c*(a + b*x^2)^p])/b))/2

________________________________________________________________________________________

Maple [A]
time = 0.45, size = 93, normalized size = 0.94

method result size
default \(d \ln \left (c \left (b \,x^{2}+a \right )^{p}\right ) x -2 d p x +\frac {2 d p a \arctan \left (\frac {b x}{\sqrt {b a}}\right )}{\sqrt {b a}}+\frac {e \ln \left (c \left (b \,x^{2}+a \right )^{p}\right ) x^{2}}{2}-\frac {e p \,x^{2}}{2}+\frac {e \ln \left (c \left (b \,x^{2}+a \right )^{p}\right ) a}{2 b}-\frac {a e p}{2 b}\) \(93\)
risch \(\left (\frac {1}{2} e \,x^{2}+d x \right ) \ln \left (\left (b \,x^{2}+a \right )^{p}\right )+\frac {i \pi d \,\mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} x}{2}+\frac {i \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} \mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) x^{2} e \pi }{4}-\frac {i \pi e \,x^{2} \mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{4}+\frac {i \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} x^{2} e \pi }{4}-\frac {i \pi d \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{3} x}{2}-\frac {i \pi e \,x^{2} \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{3}}{4}-\frac {i \pi d \,\mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \right ) x}{2}+\frac {i \pi d \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) x}{2}+\frac {\ln \left (c \right ) e \,x^{2}}{2}-\frac {e p \,x^{2}}{2}-\frac {p \ln \left (\sqrt {-b a}\, x +a \right ) d \sqrt {-b a}}{b}+\frac {p \ln \left (-\sqrt {-b a}\, x +a \right ) d \sqrt {-b a}}{b}+\frac {p \ln \left (\sqrt {-b a}\, x +a \right ) a e}{2 b}+\frac {p \ln \left (-\sqrt {-b a}\, x +a \right ) a e}{2 b}+\ln \left (c \right ) d x -2 d p x\) \(387\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*ln(c*(b*x^2+a)^p),x,method=_RETURNVERBOSE)

[Out]

d*ln(c*(b*x^2+a)^p)*x-2*d*p*x+2*d*p*a/(b*a)^(1/2)*arctan(b*x/(b*a)^(1/2))+1/2*e*ln(c*(b*x^2+a)^p)*x^2-1/2*e*p*
x^2+1/2*e/b*ln(c*(b*x^2+a)^p)*a-1/2*a*e*p/b

________________________________________________________________________________________

Maxima [A]
time = 0.56, size = 83, normalized size = 0.84 \begin {gather*} \frac {1}{2} \, {\left (\frac {4 \, a d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {a e \log \left (b x^{2} + a\right )}{b^{2}} - \frac {x^{2} e + 4 \, d x}{b}\right )} b p + \frac {1}{2} \, {\left (x^{2} e + 2 \, d x\right )} \log \left ({\left (b x^{2} + a\right )}^{p} c\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*log(c*(b*x^2+a)^p),x, algorithm="maxima")

[Out]

1/2*(4*a*d*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b) + a*e*log(b*x^2 + a)/b^2 - (x^2*e + 4*d*x)/b)*b*p + 1/2*(x^2*e
+ 2*d*x)*log((b*x^2 + a)^p*c)

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 206, normalized size = 2.08 \begin {gather*} \left [-\frac {b p x^{2} e - 2 \, b d p \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) + 4 \, b d p x - {\left (2 \, b d p x + {\left (b p x^{2} + a p\right )} e\right )} \log \left (b x^{2} + a\right ) - {\left (b x^{2} e + 2 \, b d x\right )} \log \left (c\right )}{2 \, b}, -\frac {b p x^{2} e - 4 \, b d p \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) + 4 \, b d p x - {\left (2 \, b d p x + {\left (b p x^{2} + a p\right )} e\right )} \log \left (b x^{2} + a\right ) - {\left (b x^{2} e + 2 \, b d x\right )} \log \left (c\right )}{2 \, b}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*log(c*(b*x^2+a)^p),x, algorithm="fricas")

[Out]

[-1/2*(b*p*x^2*e - 2*b*d*p*sqrt(-a/b)*log((b*x^2 + 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) + 4*b*d*p*x - (2*b*d*p*x
 + (b*p*x^2 + a*p)*e)*log(b*x^2 + a) - (b*x^2*e + 2*b*d*x)*log(c))/b, -1/2*(b*p*x^2*e - 4*b*d*p*sqrt(a/b)*arct
an(b*x*sqrt(a/b)/a) + 4*b*d*p*x - (2*b*d*p*x + (b*p*x^2 + a*p)*e)*log(b*x^2 + a) - (b*x^2*e + 2*b*d*x)*log(c))
/b]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 199 vs. \(2 (92) = 184\).
time = 4.50, size = 199, normalized size = 2.01 \begin {gather*} \begin {cases} \left (d x + \frac {e x^{2}}{2}\right ) \log {\left (0^{p} c \right )} & \text {for}\: a = 0 \wedge b = 0 \\\left (d x + \frac {e x^{2}}{2}\right ) \log {\left (a^{p} c \right )} & \text {for}\: b = 0 \\- 2 d p x + d x \log {\left (c \left (b x^{2}\right )^{p} \right )} - \frac {e p x^{2}}{2} + \frac {e x^{2} \log {\left (c \left (b x^{2}\right )^{p} \right )}}{2} & \text {for}\: a = 0 \\\frac {2 a d p \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{b \sqrt {- \frac {a}{b}}} - \frac {a d \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{b \sqrt {- \frac {a}{b}}} + \frac {a e \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{2 b} - 2 d p x + d x \log {\left (c \left (a + b x^{2}\right )^{p} \right )} - \frac {e p x^{2}}{2} + \frac {e x^{2} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*ln(c*(b*x**2+a)**p),x)

[Out]

Piecewise(((d*x + e*x**2/2)*log(0**p*c), Eq(a, 0) & Eq(b, 0)), ((d*x + e*x**2/2)*log(a**p*c), Eq(b, 0)), (-2*d
*p*x + d*x*log(c*(b*x**2)**p) - e*p*x**2/2 + e*x**2*log(c*(b*x**2)**p)/2, Eq(a, 0)), (2*a*d*p*log(x - sqrt(-a/
b))/(b*sqrt(-a/b)) - a*d*log(c*(a + b*x**2)**p)/(b*sqrt(-a/b)) + a*e*log(c*(a + b*x**2)**p)/(2*b) - 2*d*p*x +
d*x*log(c*(a + b*x**2)**p) - e*p*x**2/2 + e*x**2*log(c*(a + b*x**2)**p)/2, True))

________________________________________________________________________________________

Giac [A]
time = 3.89, size = 100, normalized size = 1.01 \begin {gather*} \frac {2 \, a d p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} + \frac {b p x^{2} e \log \left (b x^{2} + a\right ) - b p x^{2} e + 2 \, b d p x \log \left (b x^{2} + a\right ) + b x^{2} e \log \left (c\right ) - 4 \, b d p x + a p e \log \left (b x^{2} + a\right ) + 2 \, b d x \log \left (c\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*log(c*(b*x^2+a)^p),x, algorithm="giac")

[Out]

2*a*d*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) + 1/2*(b*p*x^2*e*log(b*x^2 + a) - b*p*x^2*e + 2*b*d*p*x*log(b*x^2 + a)
 + b*x^2*e*log(c) - 4*b*d*p*x + a*p*e*log(b*x^2 + a) + 2*b*d*x*log(c))/b

________________________________________________________________________________________

Mupad [B]
time = 1.13, size = 81, normalized size = 0.82 \begin {gather*} d\,x\,\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )-\frac {e\,p\,x^2}{2}-2\,d\,p\,x+\frac {e\,x^2\,\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )}{2}+\frac {a\,e\,p\,\ln \left (b\,x^2+a\right )}{2\,b}+\frac {2\,\sqrt {a}\,d\,p\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b*x^2)^p)*(d + e*x),x)

[Out]

d*x*log(c*(a + b*x^2)^p) - (e*p*x^2)/2 - 2*d*p*x + (e*x^2*log(c*(a + b*x^2)^p))/2 + (a*e*p*log(a + b*x^2))/(2*
b) + (2*a^(1/2)*d*p*atan((b^(1/2)*x)/a^(1/2)))/b^(1/2)

________________________________________________________________________________________